package main

import (
	. "fmt"
	"geometry/rectangle"
	"log"
)

var rectLen, rectWidth float64 = 6, 7

func init() {
	Println("main mackage initialized")
	if rectLen < 0 {
		log.Fatal("Length is less than zero")
	}
	if rectWidth < 0 {
		log.Fatal("Width is less than zero")
	}
}

func main() {
	Println("Geometrical shape propertiers")

	Printf("area of rectangle %.2f\n", rectangle.Area(rectLen, rectWidth))

	Printf("diagonal of rectangle %.2f\n", rectangle.Diagonal(rectLen, rectWidth))
}
